﻿namespace RuoVea.OmiApi.SystemApp.SeedData;

/// <summary>
/// 系统员工附属机构职位表种子数据
/// </summary>
public class SysUserExtOrg_SeedData : SeedDataEntity<SysUserExtOrg>
{
    /// <summary>
    /// 种子数据
    /// </summary>
    /// <returns></returns>
    public IList<SysUserExtOrg> HasData()
    {
        var userDatas = new SysUser_SeedData().HasData();
        var orgDatas = new SysOrganization_SeedData().HasData();
        var posDatas = new SysPosition_SeedData().HasData();
        return new[]
        {
            new SysUserExtOrg {  UserId =userDatas.Select(x=>x.Id).ToArray()[1],  OrgId = orgDatas.Select(x=>x.Id).ToArray()[1],  PosId = posDatas.Select(x=>x.Id).ToArray()[0],IsDefault= YesOrNot.Y,JoinDate=DateTime.Now },
            new SysUserExtOrg {  UserId =userDatas.Select(x=>x.Id).ToArray()[1],  OrgId = orgDatas.Select(x=>x.Id).ToArray()[2],  PosId = posDatas.Select(x=>x.Id).ToArray()[1],IsDefault= YesOrNot.N  },
            new SysUserExtOrg {  UserId =userDatas.Select(x=>x.Id).ToArray()[2],  OrgId = orgDatas.Select(x=>x.Id).ToArray()[3],  PosId =posDatas.Select(x=>x.Id).ToArray()[2],IsDefault= YesOrNot.Y ,JoinDate=DateTime.Now},
            new SysUserExtOrg {  UserId =userDatas.Select(x=>x.Id).ToArray()[2],  OrgId = orgDatas.Select(x=>x.Id).ToArray()[5],  PosId = posDatas.Select(x=>x.Id).ToArray()[2],IsDefault= YesOrNot.N },
            new SysUserExtOrg {  UserId =userDatas.Select(x=>x.Id).ToArray()[2],  OrgId = orgDatas.Select(x=>x.Id).ToArray()[7],  PosId = posDatas.Select(x=>x.Id).ToArray()[3],IsDefault= YesOrNot.N }
        };
    }
}